package com.canton.controller;

import com.canton.dao.entity.GrapeNode;
import com.canton.service.GrapeService;
import com.canton.service.impl.GrapeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class GrapeController {
    @Autowired
    private GrapeService grapeService;

    @RequestMapping("/findone")
    public GrapeNode findByName(String name){
        //此处name我用 “大头”代替
        GrapeNode grapeNode = grapeService.findByName("长相思");
        System.out.println(grapeNode);
        return grapeNode;
    }
}


